<style type="text/css">
<!--
.STYLE5 {font-size: 12px}
.STYLE7 {font-size: 12px; color: #FF0000; }
.STYLE11 {font-size: 12px; font-weight: bold; color: #000000; }
-->
</style>
      <div class="content bolr">
        <h2 class="h2">查看报名情况</h2>
        
        <div class="middle">
        <img src="<?php echo "./template/$BM_TEMPLATE/images/"; ?>05_03.jpg" width="860" />
        <div class="h5"></div>
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
  <tr>
    <td height="30" colspan="13" align="center" bgcolor="#FFFFFF"><table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="18"><img src="<?php echo "./template/$BM_TEMPLATE/images/"; ?>04_07.jpg" width="9" height="14" /></td>
        <td width="40"><a href="<?php echo $BM_HOME . "/results.php?cid=$cid";?>"><?php echo $MSG_GOBACK;?></a></td>
        <?php
        if ($is_admin)
        {
		?>
        <td width="10">|</td>
        <td width="18"><img src="<?php echo "./template/$BM_TEMPLATE/images/"; ?>04_09.jpg" width="14" height="14" /></td>
        <td width="80"><a href="<?php echo $BM_HOME . "/results_download.xls.php?cid=$cid&ckind=1";?>">下载报名表</a></td>
        <td width="10">|</td>
        <td width="18"><img src="<?php echo "./template/$BM_TEMPLATE/images/"; ?>04_09.jpg" width="14" height="14" /></td>
        <td width="100"><a href="<?php echo $BM_HOME . "/zipdoc_download.php?cid=$cid&ckind=1".(isset($_GET['school']) ? ("&school=".$_GET['school']) : "").(isset($_GET['xmkind']) ? ("&xmkind=".$_GET['xmkind']) : "");?>">打包下载文档</a></td>
        <?php 
        }
        ?>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="30" colspan="10" align="left" bgcolor="#ececec">
   	<form id=sele action="results.php" method="get">
		<?php
            if (isset($cid))
                echo "<input type='hidden' name='cid' value='$cid'>";
                    
            if (isset($ckind))
                echo "<input type='hidden' name='ckind' value='$ckind'>";
		?>
    <table width="70%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center">筛选学校：</td>
        <td><select name="school" id="school">
        <?php
            if (!isset($_GET['school']))
                $sele_school = -1;
            if ($sele_school < 0 || $sele_school >= $sele_school_cnt)
                $sele_school = -1;
            if ($sele_school == -1)
                echo "<option value='-1' selected>All</option>";
            else
                echo "<option value='-1'>All</option>";
            $i = 0;
            for ($i = 0; $i < $sele_school_cnt; $i++) 
            {
                if ($i == $sele_school)
                    echo "<option value=$i selected>$to_sele_school[$i]</option>";
                else
                    echo "<option value=$i>$to_sele_school[$i]</option>";
            }
		?>
        </select></td>
        <td align="center">筛选项目类型：</td>
        <td><select name="xmkind" id="xmkind">
          <?php
			if (!isset($_GET['xmkind']))
				$sele_xmkind = -1;
			if ($sele_xmkind < 0 || $sele_xmkind >= $sele_xmkind_cnt)
				$sele_xmkind = -1;
			if ($sele_xmkind == -1)
				echo "<option value='-1' selected>All</option>";
			else
				echo "<option value='-1'>All</option>";
			$i = 0;
						
			for ($i = 0; $i < $sele_xmkind_cnt; $i++) 
			{
				if ($i == $sele_xmkind)
				echo "<option value=$i selected>$to_sele_xmkind[$i]</option>";
				else
				echo "<option value=$i>$to_sele_xmkind[$i]</option>";
			}
		  ?>
          </select></td>
        <td><input type="image" name="imageField" id="imageField" src="<?php echo "./template/$BM_TEMPLATE/images/"; ?>04_14.jpg" /></td>
      </tr>
    </table>
	</form>
	</td>
    </tr>
  <tr>
    <td nowrap width="6%" height="30" align="center" bgcolor="#d6d6d6"><span class="STYLE11">编号</span></td>
    <td nowrap width="10%" align="center" bgcolor="#d6d6d6"><span class="STYLE11">项目类型</span></td>
    <td nowrap width="8%" align="center" bgcolor="#d6d6d6"><span class="STYLE11">学校</span></td>
    <td nowrap width="10%" align="center" bgcolor="#d6d6d6"><span class="STYLE11">队伍名称</span></td>
    <td nowrap width="15%" align="center" bgcolor="#d6d6d6"><span class="STYLE11"><?php echo $MSG_COACH;?></span></td>
    <?php
    if ($is_admin)
    {
   	?>
    <td nowrap width="10%" align="center" bgcolor="#d6d6d6"><span class="STYLE11">联系方式</span></td>
    <?php 
    }
    ?>
    <?php
    if ($is_admin)
    {
   	?>
    <td nowrap width="10%" align="center" bgcolor="#d6d6d6"><span class="STYLE11">参赛项目</span></td>
    <td nowrap width="10%" align="center" bgcolor="#d6d6d6"><span class="STYLE11">查看队员</span></td>
    <td nowrap width="10%" align="center" bgcolor="#d6d6d6"><span class="STYLE11">项目文档</span></td>
    <td nowrap width="11%" align="center" bgcolor="#d6d6d6"><span class="STYLE11">删除队伍</span></td>
    <?php 
    }
    ?>
  </tr>
  <?php 
  				while ($row = mysql_fetch_object($result)) 
                {
                	echo "<tr  height=\"30\">";
            		if($i & 1) $BGCOL = "#D6D6D6";
            		else $BGCOL = "#ECECEC";
                    $i++;
                    $team_xmkind = $xmkind_name[$row->team_kind];
                    if ($is_admin) 
                    {
                        echo "
							<td bgcolor=\"$BGCOL\"><span class=\"STYLE5\">".SqlToHtml($row->team_id)."</span></td>
							<td bgcolor=\"$BGCOL\"><span class=\"STYLE5\">$team_xmkind</span></td>
							<td nowrap bgcolor=\"$BGCOL\"><span class=\"STYLE5\">".SqlToHtml($row->team_school)."</span></td>
							<td bgcolor=\"$BGCOL\"><span class=\"STYLE5\">".SqlToHtml($row->team_name)."</span></td>
							<td bgcolor=\"$BGCOL\"><span class=\"STYLE5\">".SqlToHtml($row->team_coach)."</span></td>
							<td bgcolor=\"$BGCOL\"><span class=\"STYLE5\">".SqlToHtml($row->team_phone)."</span></td>
							<td bgcolor=\"$BGCOL\"><span class=\"STYLE5\">".SqlToHtml($row->team_xmname)."</span></td>
							<td bgcolor=\"$BGCOL\"><span class=\"STYLE5\"><a href='" . $BM_HOME . "/results.php?cid=$cid&ckind=1&tid=$row->team_id'>查看队员</a></td>
							";
                        if (strlen($row->team_upload) == 0)
                            echo "<td bgcolor=\"$BGCOL\"><span class=\"STYLE5\"><font color=red>未上传</font></span></td>";
                        else
                            echo "<td bgcolor=\"$BGCOL\"><span class=\"STYLE5\"><a href = '" . $BM_HOME.$row->team_upload . "'>下载项目</td>";
                        echo "<td bgcolor=\"$BGCOL\"><span class=\"STYLE5\"><a href='" . $BM_HOME . "/admin_delete.php?cid=$cid&tid=$row->team_id'  onclick='return confirm(\"删除是不可恢复的，确认要删除吗？\");'>删除</a></td></tr>";
                    } 
                    else 
                    {
                        echo "
								<td bgcolor=\"$BGCOL\"><span class=\"STYLE5\">".SqlToHtml($row->team_id)."</span></td>
								<td bgcolor=\"$BGCOL\"><span class=\"STYLE5\">".SqlToHtml($row->team_school)."</span></td>
								<td bgcolor=\"$BGCOL\"><span class=\"STYLE5\">".SqlToHtml($row->team_name)."</span></td>
								<td bgcolor=\"$BGCOL\"><span class=\"STYLE5\">".SqlToHtml($row->team_coach)."</span></td>
								<td bgcolor=\"$BGCOL\"><span class=\"STYLE5\">$team_xmkind</span></td>		
						";
                    }
                    echo "</tr>";
                }
  
 	?>
</table>
</div>
<div style="height:150px;"></div>
